<input hidden="hidden" id="navValue" value="权限分配">
<div class="page-content">
    <div class="page-header">
        <h1>
            	权限管理
            <small>
                <i class="ace-icon fa fa-angle-double-right"></i>
                	分配列表
            </small>

        </h1>
    </div><!-- /.page-header -->

    <div class="row">
        <div class="col-xs-12">
            <table id="simple-table" class="table  table-bordered table-hover">
                <thead>
                <tr>
                    <th class="center">用户组别</th>
                    <th class="center">读写分配（注：默认为可写操作，选择只读配置后将不可进行增加、删除等操作！）</th>
                    <th class="center">操作</th>
                </tr>
                </thead>

                <tbody>
                {volist name="group" id="group"}
                	<form action="{:url('permissions/set')}" method="post">
		                {if condition="$group.name neq '超级用户组'"}
			                <tr  class="center">
			                    <input type="hidden" name="id" value="{$group.id}"/>	
			                    <td>{$group.name}</td>
			                    <td>
			                    	{foreach $module as $vo} 
			    						{in name="$vo.id" value="$group.module_id"}
                                        <input name="module[]" value="{$vo.id}" type="checkbox" checked="checked" disabled/>&nbsp;{$vo.module_name}&nbsp;｛只读｝&nbsp;
			        					{else/}
                                            {if condition="$group.module_id neq 0"}
                                            <input name="module[]" value="{$vo.id}" type="checkbox" disabled/>&nbsp;{$vo.module_name}&nbsp;｛只读｝&nbsp;
                                            {else /}
                                            <input name="module[]" value="{$vo.id}" type="checkbox"/>&nbsp;{$vo.module_name}&nbsp;｛只读｝&nbsp;
                                            {/if}
							            {/in}          				            				
					            	{/foreach}
			                    </td>
			                    <td>
			                    	{if condition="$group.module_id neq 0"}
			                    		<a href="{:url('permissions/reset')}?id={$group.id}"><button class="btn btn-primary  btn-xs" type="button"> <i class="fa fa-pencil-square-o"></i>重置</button></a>
			                    	{else /}
			                    		<button class="btn btn-primary  btn-xs" type="submit"> <i class="fa fa-pencil-square-o"></i>保存</button>
			                    	{/if}						                    					                   
			                    </td>	                  
			                </tr>
		                {/if}
	                </form>
                {/volist}
                </tbody>
            </table>
        </div><!-- /.span -->
    </div><!-- /.row -->

            <!-- PAGE CONTENT ENDS -->
</div><!-- /.col -->
 